<template>
  <div>

    <!-- 菜单部分 -->
    <el-menu mode="horizontal">
      <h1>大屏可视化看板</h1>
      <el-menu-item index="home" @click="goTo('homepage')">首页</el-menu-item>

      <el-menu-item index="chart" @click="goTo('chart')">图表示例</el-menu-item>
      <el-menu-item index="table" @click="goTo('table')">数据表格</el-menu-item>
    </el-menu>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'


const router = useRouter()

const goTo = (route) => {
  router.push(`/${route}`)
}
</script>
